package pc29;

import pc29.model.Ch04Ex05Add;
import pc29.model.Ch04Ex05Sub;
import pc29.model.Ch04Ex05Mul;
import pc29.model.Ch04Ex05Div;
import java.util.Scanner;

public class Ch04ExCalculate {

	public static void main(String[] args) {

		int a;
		int b;
		String c = "";
		Scanner sc = new Scanner(System.in);

		System.out.println("두 정수와 연산자를 입력");
		a = sc.nextInt();
		b = sc.nextInt();
		c = sc.next();

		switch (c) {
		case "+":
			Ch04Ex05Add add = new Ch04Ex05Add(a, b);
			System.out.println(add.toString());
			break;
		case "-":
			Ch04Ex05Sub sub = new Ch04Ex05Sub(a, b);
			System.out.println(sub.toString());
			break;
		case "*":
			Ch04Ex05Mul mul = new Ch04Ex05Mul(a, b);
			System.out.println(mul.toString());
			break;
		case "/":
			Ch04Ex05Div div = new Ch04Ex05Div(a, b);
			System.out.println(div.toString());
			break;
		default:
			break;

		}

	}

}
